# -*- coding: utf-8 -*-
from django.db import models
from datetime import datetime

class Estabelecimento(models.Model):
	nomeEstabelecimento=models.CharField("Nome do Estabelecimento", max_length=50)
	endereco=models.CharField(max_length=100)
	telefone=models.CharField(max_length=10)
	url=models.URLField("Site", blank=True, null=True)
	data_de_publicacao=models.DateTimeField(default=datetime.now)
	def __unicode__(self):
		return self.nomeEstabelecimento
		
class Guia(models.Model):
	class Meta:
		verbose_name_plural = "Hotéis e Restaurantes"
	cidade = models.CharField(max_length=50)
	estabelecimento = models.ManyToManyField(Estabelecimento, blank = True, null = True)
	data_de_publicacao=models.DateTimeField(default=datetime.now)
	def __unicode__(self):
		return self.cidade
